package org.haq.bae.datamodel;

/**
 * ViewFieldModel
 * Date: 5/1/12
 * Description:
 */
public class ViewFieldModel extends FieldModel implements Validatable {

    private String caption;
    private String validationType;
    private String validationRegex;
    private String ownedBy;
    private boolean editable = true;
    private String manyToOneLovId;
    private String oneToManyViewId;


    public ViewFieldModel() {

    }


    public ViewFieldModel(String id, String caption, boolean nullable, String type, String width) {
        this();
        this.id = id;
        this.caption = caption;
        this.nullable = nullable;
        this.type = type;
        this.width = width;
    }


    @Override
    public String getId() {
        return super.id;
    }

    @Override
    public void setId(String id) {
        super.id = id;
    }


    public String getCaption() {
        return caption;
    }

    public void setCaption(String caption) {
        this.caption = caption;
    }


    public String getValidationType() {
        return validationType;
    }

    public void setValidationType(String validationType) {
        this.validationType = validationType;
    }

    public String getValidationRegex() {
        return validationRegex;
    }

    public void setValidationRegex(String validationRegex) {
        this.validationRegex = validationRegex;
    }

    public String getOwnedBy() {
        return ownedBy;
    }

    public void setOwnedBy(String ownedBy) {
        this.ownedBy = ownedBy;
    }

    public boolean isEditable() {
        return editable;
    }

    public void setEditable(boolean editable) {
        this.editable = editable;
    }

    @Override
    public boolean isValid() {
        return false;
    }

    public String getManyToOneLovId() {
        return manyToOneLovId;
    }

    public void setManyToOneLovId(String manyToOneLovId) {
        this.manyToOneLovId = manyToOneLovId;
    }

    public String getOneToManyViewId() {
        return oneToManyViewId;
    }

    public void setOneToManyViewId(String oneToManyViewId) {
        this.oneToManyViewId = oneToManyViewId;
    }
}
